package com.zoffy.catdiarybackend.model.enums.article;

public enum ArticleType {
    MARKDOWN("Markdown"),
    SLATE("Slate"),
    EXCALIDRAW("Excalidraw");

    public static ArticleType getEnumByValue(String value){
        if(value==null || "".equals(value)){
            return null;
        }
        for(ArticleType articleType:values()){
            if(articleType.getType().equals(value)){
                return articleType;
            }
        }
        return null;
    }

    ArticleType(String type){
        this.type=type;
    }
    private final String type;
    public String getType(){
        return type;
    }
}
